const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  systemInfo: state => state.app.systemInfo,

  token: state => state.user.token,
  userInfo: state => state.user.userInfo,
  isAdmin: state => state.user.userInfo?.isAdmin, // 是否是管理员账号
  isPlatFormUser: state => state.user.userInfo?.userType === 0, // 是否是平台账号
  isEnterpriseUser: state => state.user.userInfo?.userType === 1, // 是否是企业账号

  routes: state => state.sys.routes,
  dynamicRoutes: state => state.sys.dynamicRoutes,
  authButtons: state => state.sys.pageButtonList,
  dict: state => state.sys.dict,
  areaTree: state => state.sys.areaTree,
  allAreaTree: state => state.sys.allAreaTree,
  gaodeDict: state => state.sys.gaodeDict,
  permission_routes: state => state.sys.routes,
  isLogin: state => state.sys.isLogin,
  typeCollector: state => state.dataset.typeCollector
}

export default getters
